include_directories(${PROJECT_SOURCE_DIR})

add_executable(conf_test base/conf_test.cc)
target_link_libraries(conf_test tinyrpc)


add_executable(timestamp_test base/timestamp_test.cc)
target_link_libraries(timestamp_test tinyrpc)


add_executable(thread_test base/thread_test.cc)
target_link_libraries(thread_test tinyrpc)

add_executable(co_asm_test base/co_asm_test.cc)
target_link_libraries(co_asm_test tinyrpc)

add_executable(coroutine_benchmark base/coroutine_benchmark.cc)
target_link_libraries(coroutine_benchmark tinyrpc)

add_executable(coroutine_test base/coroutine_test.cc)
target_link_libraries(coroutine_test tinyrpc)

add_executable(task_test base/task_test.cc)
target_link_libraries(task_test tinyrpc)

add_executable(threadpool_test base/threadpool_test.cc)
target_link_libraries(threadpool_test tinyrpc)

add_executable(logger_test base/logger_test.cc)
target_link_libraries(logger_test tinyrpc)

add_executable(timerqueue_test net/timerqueue_test.cc)
target_link_libraries(timerqueue_test tinyrpc_net tinyrpc )

add_executable(eventloop_test net/eventloop_test.cc)
target_link_libraries(eventloop_test tinyrpc_net tinyrpc )

add_executable(wakeup_channel_test net/wakeup_channel_test.cc)
target_link_libraries(wakeup_channel_test tinyrpc_net tinyrpc )

add_executable(coroutine_sleep_test net/coroutine_sleep_test.cc)
target_link_libraries(coroutine_sleep_test tinyrpc_net tinyrpc )

add_executable(tcpserver_test1 net/tcpserver_test1.cc)
target_link_libraries(tcpserver_test1 tinyrpc_net tinyrpc )

add_executable(eventloopthread_test net/eventloopthread_test.cc)
target_link_libraries(eventloopthread_test tinyrpc_net tinyrpc )

add_executable(eventloopthreadpool_test net/eventloopthreadpool_test.cc)
target_link_libraries(eventloopthreadpool_test tinyrpc_net tinyrpc )

add_executable(coroutine_accept_test net/coroutine_accept_test.cc)
target_link_libraries(coroutine_accept_test tinyrpc_net tinyrpc )


add_executable(coroutine_write_test net/coroutine_write_test.cc)
target_link_libraries(coroutine_write_test tinyrpc_net tinyrpc )


add_executable(redis_test rpc/redis_test.cc)
target_link_libraries(redis_test hiredis)



add_executable(redis_client_test rpc/redis_client_test.cc)
target_link_libraries(redis_client_test tinyrpc_rpc tinyrpc_net tinyrpc hiredis)